//
// Created by dale on 2023/12/10.
//

#ifndef TOY_PERSON_H
#define TOY_PERSON_H


#include <string>
#include <iostream>

class Person {
private:
    int id;



public:
    std::string name;

    Person(){};
    explicit Person(std::string n){
        name = n;
    }

    // 拷贝构造函数
    Person(const Person &source) {
        std::cout << "copy construct "<<source.name << std::endl;
        name= source.name;
    }
    int age;
    std::string SayHello();
    std::string get_name(){return  name;};

    int getId(){
        return id;
    }

    void setId(int a){
        id=a;
    }
};


#endif //TOY_PERSON_H
